<!-- <template>
      <el-dialog title="修改" :visible.sync="openStorageSpecDictDetails" width="450px" append-to-body :destroy-on-close="true" :before-close="beforeClose">
        <el-form ref="form" :model="formParams" label-width="160px" v-show="showSearch" :inline="true">
          <el-form-item label="关键词" prop="allName">
            <el-input
              v-model="formParams.allName"
              :disabled="true"
            />
          </el-form-item>
          <el-form-item  label="纱支" prop="wpggA">
            <el-select v-model="formParams.wpggA" size="mini" placeholder="请选择" :loading="storageSpecDictListLoading">
                <el-option
                    v-for="item in storageSpecDictList.a"
                    :key="item.id"
                    :label="item.name"
                    :value="item.name">
                </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="工艺" prop="wpggB">
              <el-select v-model="formParams.wpggB" size="mini" placeholder="请选择" :loading="storageSpecDictListLoading">
                <el-option
                  v-for="item in storageSpecDictList.b"
                  :key="item.id"
                  :label="item.name"
                  :value="item.name">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item prop="wpggC" label="工序">
              <el-select v-model="formParams.wpggC" size="mini" placeholder="请选择" :loading="storageSpecDictListLoading">
                <el-option
                  v-for="item in storageSpecDictList.c"
                  :key="item.id"
                  :label="item.name"
                  :value="item.name">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item prop="wpggD" label="用途">
                <el-select v-model="formParams.wpggD" size="mini" placeholder="请选择" :loading="storageSpecDictListLoading">
                <el-option
                  v-for="item in storageSpecDictList.d"
                  :key="item.id"
                  :label="item.name"
                  :value="item.name">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item prop="wpggE" label="产地">
              <el-select v-model="formParams.wpggE" size="mini" placeholder="请选择" :loading="storageSpecDictListLoading">
                <el-option
                  v-for="item in storageSpecDictList.e"
                  :key="item.id"
                  :label="item.name"
                  :value="item.name">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item prop="wpggF" label="漂染性">
                <el-select v-model="formParams.wpggF" size="mini" placeholder="请选择" :loading="storageSpecDictListLoading">
                <el-option
                  v-for="item in storageSpecDictList.f"
                  :key="item.id"
                  :label="item.name"
                  :value="item.name">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item prop="wpggG" label="生产日期">
              <el-date-picker
                value-format="yyyy-MM-dd"
                v-model="formParams.wpggG"
                type="date"
                placeholder="生产日期"
                size="mini"
                style="width:90%">
              </el-date-picker>
            </el-form-item>
            <el-form-item prop="wpggH" label="颜色">
              <el-input v-model="formParams.wpggH" size="mini" placeholder="请输入内容" />
            </el-form-item>
            <el-form-item prop="itbz" label="备注">
                <el-input v-model="formParams.itbz" size="mini" placeholder="请输入内容" />
            </el-form-item>
          <el-row class="mt20" type="flex" justify="center">
            <el-col :span="1.5">
              <el-button type="primary" size="mini" @click="handleEdit">修 改</el-button>
            </el-col>
          </el-row>
        </el-form>
      </el-dialog>
  </template>
  
  <script>
  import { warehouseInDetailsDropDown1 } from "@/api/storage/commonGoods/warehouseIn"
  import { storageSpecKeywordModify  }  from "@/api/storage/storageSetting/storageSpecKeyword";
  
  
  export default {
    name: "StorageSpecKeywordEdit",
    data() {
      return {
        // 显示搜索条件
        showSearch: true,
        //弹窗状态
        openStorageSpecDictDetails:false,
        //规格字典加载
        storageSpecDictListLoading: true,
        //显示参数
        formParams: {},
        // 查询参数
        submitParams: {
            allName:"",
            wpggA: "",
            wpggB: "",
            wpggC: "",
            wpggD: "",
            wpggE: "",
            wpggF: "",
            wpggG: "",
            itbz:"",
        },
      };
    },
    methods: {
      /**获取规格字典 */
      getStorageSpecDictDetails() {
        this.storageSpecDictListLoading= true
        warehouseInDetailsDropDown1({}).then(response => {
          this.storageSpecDictList = response.data;
          this.storageSpecDictListLoading= false
        });
      },
      /**修改 */
      handleEdit() {
         const submitParams = this.submitParams
        const formParams = this.formParams
        for(let i in submitParams) {
          submitParams[i] = formParams[i]
          
        }
        //this.$modal.loading("数据正在修改中，请稍等...")
        // storageSpecKeywordModify(this.submitParams).then(response => {
        //   this.$modal.closeLoading()
        //   this.close()
        //   this.$emit('refresh', true)
        // }).catch(()=> {
        //   this.$modal.closeLoading()
        // })
      },
  
      /**改变窗口状态 */
      changeStorageSpecDictDetails() {
        this.openStorageSpecDictDetails = !this.openStorageSpecDictDetails;
      },
      /**重置数据 */
      reset(vm) {
        Object.assign(vm.$data, vm.$options.data())
      },
      /**关闭弹窗 */
      beforeClose(done) {
        this.close()
        done()
      },
      /**关闭弹窗 */
      close() {
        this.changeStorageSpecDictDetails()
        this.reset(this)
      },
      /**打开弹窗 */
      open(data) {
        this.changeStorageSpecDictDetails()
        this.formParams = {
          aid: "",
          issell: data.issellT,
          issh: data.isshT,
          line: "",
          zt: data.zt,
          allName:data.allName
        }
        this.getStorageSpecDictDetails()
      }
    }
  };
  </script> -->
  